//
//  WBdDemoViewController.swift
//  weiboswift
//
//  Created by dingzhibing on 2017/3/6.
//  Copyright © 2017年 dingzhibing. All rights reserved.
//

import UIKit

class WBDemoViewController: WBBaseViewController {
    override func viewDidLoad(){
        super.viewDidLoad()
        
        title = "第\(navigationController?.childViewControllers.count ?? 0)"
    }
    
    @objc func showNext(){
        let vc = WBDemoViewController()
        navigationController?.pushViewController(vc, animated: true)
    }
}

extension WBDemoViewController{
    
    override func setupTableView() {
        super.setupTableView()
        navItem.rightBarButtonItem = UIBarButtonItem(title: "下一个", target: self, action: #selector(showNext))
    }
    
//    override func setupUI() {
//        super.setupUI()
//        
////        navigationItem.rightBarButtonItem = UIBarButtonItem(title: "下一个", style: UIBarButtonItemStyle.plain, target: self, action: #selector(showNext))
//    }
}
